/**
* @description: 789. 逃脱阻碍者
* @author hewei
* @date 2022/8/27 14:51
* @version 1.0
*/

public class EscapeGhosts {

    public boolean escapeGhosts(int[][] ghosts, int[] target) {
        int x = target[0];
        int y = target[1];
        int temp = Math.abs(x) + Math.abs(y);
        for (int[] ghost : ghosts) {
            int a = Math.abs(ghost[0] - x) + Math.abs(ghost[1] - y);
            if (a <= temp) return false;
        }
        return true;
    }
}
